package ziv.map.activity;

import ziv.map.mapMain;
import ziv.map.R;
import ziv.map.utils.Constant;
import ziv.utils.html.HttpDownloader;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class MeActivity extends Activity{
	EditText meEditText=null;
	Button meButton=null;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.me);
		meEditText=(EditText)findViewById(R.id.meEditText);
		meEditText.setText("13488661990");
		meButton=(Button)findViewById(R.id.meButton);
		meButton.setOnClickListener(new OnClickListener(){

			@Override
			public void onClick(View v) {
				if(!"".equals(meEditText.getText().toString())){
					HttpDownloader httpDownloader=new HttpDownloader();
					String addObserve=Constant.addObserve;
					addObserve=addObserve.replace("{1}", Constant.selfMobile);
					addObserve=addObserve.replace("{2}", meEditText.getText());
					//Log.v("ziv",addObserve);
					String response=httpDownloader.download(addObserve);
					//Log.v("ziv",response);
				}
				Intent intent = new Intent(MeActivity.this, mapMain.class);
				startActivity(intent);
			}
			
		});
	}

}
